package com.chenshu.mycnblog.mapper;

import com.chenshu.mycnblog.model.ArticleInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA
 * Description：文章的mapper
 * User：chenshu
 * Date：2024-01-02
 * Time：11:37
 */
@Mapper
public interface ArticleMapper {

    public List<ArticleInfo> selectByUid(@Param("uid") Integer uid);

    public ArticleInfo selectById(@Param("id") Integer id);

    public List<ArticleInfo> selectByLimit(@Param("offset") Integer offset, @Param("pageSize") Integer pageSize);

    public Integer insertArticle(ArticleInfo articleInfo);

    public Integer updateArticle(ArticleInfo articleInfo);

    public Integer selectArticleCount();

    public Integer deleteArticleById(@Param("id") Integer id);
}
